﻿
using AnesSystem.Controls.Operation.CQ.CQFY;
using AnesSystem.Services;
using AnesSystem.ViewModels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace AnesSystem.Controls.Operation.SC.CDTY
{
    /// <summary>
    /// AnesOperInfoCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class AnesOperInfoCtrl : UserControl
    {
        public AnesOperInfoCtrl()
        {
            InitializeComponent();
            this.DataContext = AnesOperInfoCtrlViewModel.Instance;

            this.Loaded += AnesOperInfoCtrl_Loaded;

        }

        private void AnesOperInfoCtrl_Loaded(object sender, RoutedEventArgs e)
        {
            if (zxcc.IsChecked)
            {
                DataManager.Instance.CurrentPatientLink.QualityPojo.Zxjmcc = true;
            }
        }




        private void zxcc_CheckChanged(object sender, RoutedEventArgs e)
        {
            CustomCheckBoxCtrl check = sender as CustomCheckBoxCtrl;
            bool istrue = check.IsChecked;
            if (istrue)
            {
                DataManager.Instance.CurrentPatientLink.QualityPojo.Zxjmcc = true;
            }
        }


        private void ysss_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DrugAndEventWindow.Instance.CusContent = new AnethOperInfoYiShissCtrl();
            DrugAndEventWindow.Instance.ShowDialog();
        }

        private void shzd_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            DrugAndEventWindow.Instance.CusContent = new AnethOperInfoShuHouZhenDuanCtrl();
            DrugAndEventWindow.Instance.ShowDialog();
        }

    }
}
